/*
 * Filename : SOCQueryReader.java 
 * Package :  com.spi.soconversion
 * Created by: Software Paradigms International Group, LLC. (SPI) 
 * Copyright (c) 2010 HBC
 */

package com.spi.soconversion.util;

import java.util.ResourceBundle;

/**
 * This class provides methods for getting sql queries
 * <p>
 * Issues:
 * <p>
 * NONE
 * <p>
 * History:
 * <p>
 * <ul>
 * <li>2010.04.29 pk: created
 * </ul>
 *
 * @author Priya Khanna, SPI (pk)
 */

public class QueryReader
{
    /**
     * Holds the reference of Resource bundle for the SOConversion Queries 
     * properties file
     */
    private static final String RESOURCE_BUNDLE = 
        "com.spi.soconversion.util.SOCQueries";

    /**
     * Reference to the resource bundle
     */
    private static final ResourceBundle MESSAGE_BUNDLE = 
        ResourceBundle.getBundle(RESOURCE_BUNDLE);

    /**
     * This method returns the query corresponding to the integer lookup
     * provided
     * 
     * @param lookup The integer that represents the error to report
     * @return String The query for the given lookup
     */
    public static String getQuery(int lookup)
    {

        String result = null;
        if (null != MESSAGE_BUNDLE)
        {
            result = MESSAGE_BUNDLE.getString(Integer.toString(lookup));
        }
        return result;
    }
}